package dome1;

/*
protected访问限定符
不同包中的子类



被private修饰的成员变量被继承了，只不过不能访问！！！
 */





public class TestDome1 {

    protected String name;
    private  int age;


    protected TestDome1(String name) {
        this.name = name;
    }

//    public TestDome1(String name, int age) {
//        this.name = name;
//        this.age = age;
//    }
}



class Dome extends TestDome1{

    public Dome(String name) {
        super(name);
    }

//    public Dome(String name, int age) {
//        super(name, age);
//    }

    public void show() {
        System.out.println(super.name);
//       System.out.println(super.age); //age被继承了，只不过不能访问
    }

    public static void main(String[] args) {
        Dome dome = new Dome("麻子");
        dome.show();

        System.out.println("========");

//        Dome dome1 = new Dome("mazi",10);
//        dome1.show();



    }
}
